/* 全局容器样式 */
.novel-detail-container {
    width: 100%;
    min-width: 1200px;
    margin: 0 auto;
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
}

.top-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
}

.time {
    font-size: 14px;
}

.top-links>.link {
    margin-left: 15px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.top-links>.link:hover {
    color: #f00;
}

.header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.logo img {
    height: 50px;
}

.nav-categories {
    margin-left: 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

.nav-categories>.category {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    cursor: pointer;
}

.nav-categories>.category:hover {
    color: #f00;
}

.sub-nav {
    margin-left: auto;
    display: flex;
}

.sub-nav>.sub-link {
    margin-left: 15px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.main-nav {
    background-color: #00b38a;
    padding: 10px 20px;
    display: flex;
}

.main-nav .main-nav-item {
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 内容主体：弹性布局核心 */
.detail-content {
    display: flex;
    padding: 20px;
    background-color: #fff;
    min-height: 600px;
    gap: 30px; /* 左右栏间距 */
}

/* 内容区域容器：包裹左右分栏 */
.content-wrapper {
    display: flex; /* 关键：开启弹性布局 */
    width: 100%; /* 占满父容器宽度 */
}

/* 左侧区域：占比60% */
.left-section {
    flex: 6; /* 左侧占60%（总10份） */
    display: flex;
    flex-direction: column; /* 垂直排列封面和文案 */
    gap: 20px; /* 封面与文案的间距 */
}

/* 封面样式 */
.cover {
    width: 200px; /* 固定封面宽度 */
    align-self: flex-start; /* 左对齐，不拉伸 */
}
.cover img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
}

/* 文案区域样式 */
.copywriting {
    flex: 1; /* 占满左侧剩余空间 */
}
.copywriting .title {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}
.copywriting .author {
    font-size: 16px;
    color: #666;
    margin: 0 0 15px 0;
}
.copywriting-text {
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}
.brief-intro, .creation-intent, .tags {
    color: #666;
    margin-bottom: 5px;
}

/* 右侧区域：占比40% */
.right-section {
    flex: 4; /* 右侧占40%（总10份） */
    display: flex;
    flex-direction: column; /* 垂直排列信息模块 */
    gap: 20px; /* 两个模块的间距 */
}

/* 作品信息模块 */
.work-info {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    flex: 1; /* 占满右侧上部空间 */
}
.work-info-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}
.label {
    display: inline-block;
    width: 80px;
    text-align: right;
    margin-right: 10px;
    color: #666;
}

/* 勤奋指数星星 */
.star {
    color: #ffd700; /* 金色星星 */
    margin-right: 2px;
}

/* 霸王票排行模块 */
.ranking-info {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    min-height: 300px; /* 固定最小高度 */
}
.ranking-list p {
    margin: 5px 0;
    line-height: 1.6;
}
.rank-num {
    display: inline-block;
    width: 20px;
    text-align: right;
    margin-right: 5px;
    color: #999;
}
.rank-name {
    color: #333;
    font-weight: bold;
}
.more-ranking {
    margin: 10px 0;
}
.more-ranking a {
    color: #0066cc;
    margin-right: 10px;
    text-decoration: none;
}
.qr-code-tip {
    margin-top: 15px;
    color: #666;
}
.qr-code {
    margin-top: 10px;
}
.qr-code img {
    width: 100px;
    height: 100px;
}
.qr-code p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

/* 加载状态样式 */
.loading-mask {
    flex: 1; /* 占满整个内容区 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* 占满宽度 */
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00b38a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-mask p {
    margin-top: 10px;
    color: #666;
}

/* 错误状态样式 */
.error-message {
    flex: 1; /* 占满整个内容区 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%; /* 占满宽度 */
}
.error-message p {
    color: #f00;
}
.error-message button {
    padding: 5px 15px;
    background-color: #00b38a;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.error-message button:hover {
    background-color: #009975;
}